home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4046 < prev    next >
Encoding:
Text File  |  1996-08-05  |  846 b   |  37 lines

  1. Path: cs.uwa.edu.au!gordon
  2. From: gordon@cs.uwa.edu.au (Gordon Royle)
  3. Newsgroups: crl.general,comp.sys.sun.misc,comp.unix.sys5.misc,comp.lang.c,sci.math
  4. Subject: Re: Problem with C for the mathematical programm
  5. Date: 1 Feb 96 14:52:04 GMT
  6. Organization: The University of Western Australia
  7. Message-ID: <gordon.823186324@cs.uwa.edu.au>
  8. References: <4epq2e$h4b@crl2.crl.com>
  9. NNTP-Posting-Host: wallaroo.cs.uwa.oz.au
  10. X-Newsreader: NN version 6.5.0 #3 (NOV)
  11.  
  12. sorkin@crl.com (Iouri Sorkine) writes:
  13.  
  14.  
  15. >I execute "cc name.c" and receive "ld: Undefined symbol
  16. >                                       _cos
  17. >                                       _sin
  18.  
  19. Need to include the math libraries.
  20.  
  21. Put
  22.  
  23. #include <math.h>
  24.  
  25. in your program
  26.  
  27. and compile with
  28.  
  29. cc name.c -lm
  30.  
  31.  
  32. gordon
  33. -- 
  34. Gordon Royle ---- gordon@cs.uwa.edu.au
  35. Visit http://www.cs.uwa.edu.au/~gordon
  36. --
  37.